1. Field of the Invention
The present invention generally relates to the Internet, and more specifically relates to a method, system, and computer program product for preventing a web browser from loading content from undesirable sources.
2. Related Art
Web pages often include banner advertisements and popup windows that originate from third party sources (e.g., ad servers). For the most part, such banner advertisements and popup windows are well behaved and do not significantly intrude on an end user's experience. However at other times (and this is becoming much more common) banner advertisements and popup windows can be very distracting and annoying to a user and can contain undesirable content. Flashy multimedia in banner advertisements and popup windows can consume significant bandwidth and can even infect a user's computer with unwanted software. Such unwanted software can include, for example, software that covertly gathers user information through a user's Internet connection without his or her knowledge, usually for advertising purposes (e.g., spyware), software (often malicious) that installs itself surreptitiously on a user's computer (e.g., a Trojan horse), or software that causes a popup window to spawn one or more subsequent popup windows when closed by a user. Banner advertisements and popup windows can also contain undesirable content (e.g., pornography) that is offensive to some users.
An illustrative web page 10 assembled by a web browser using content retrieved from a plurality of different sources is depicted in FIG. 1. One or more sections of the web page 10 are used to display information that is not necessarily relevant to the main content 12 of the web page 10. In this example, the information is provided in the form of banner advertisements 14, 16 and a popup window 18, which have been delineated from the main content 12 using dotted lines for illustrative purposes only. The information displayed in the banner advertisements 14, 16 and the popup window 18 is retrieved by the web browser rendering the web page 10 from one or more web servers 20. The typically “undesired” content 24 for the banner advertisements 14, 16 and the popup window 18 is obtained by the web browser by pointing to a respective website (e.g., adsite1.com, adsite2.com, adsite3.com) on a respective web server 20 using a hostname (via a domain name service (DNS) or hosts file) or an Internet Protocol (IP) address 26. The “desired” main content 12 of the web page 10 is obtained in a similar manner from one or more websites (e.g., contentsite(s).com) on one or more web servers 20.
Since the undesirable content in a web page usually comes from third party sources, the website hosting the web page is often oblivious to the problems experienced by an end user that are associated with banner advertisements and popup windows. Accordingly, there is a need for a way for a user to selectively block out content from undesirable third party sources while still retaining desirable content in place on a web page.